<%@page import="java.util.ArrayList"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
	<%
	request.setCharacterEncoding("utf-8");
	String username = request.getParameter("username");
	System.out.println(username);
	session.setAttribute("user", username);
	List<String> users = (List<String>) application.getAttribute("users");
	if (users == null)
		users = new ArrayList<>();
	users.add(username);
	application.setAttribute("users", users);
	response.sendRedirect("room.jsp");
	%>

</body>
</html>